Can't access jQuery UI from inside a class function when loaded programmatically